package com.qk.management.mapper;

import com.qk.dto.course.CourseDto;
import com.qk.entity.Course;
import com.qk.vo.CourseVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {
//    List<CourseVO> getCourseList(String  name, String subject,String  target);

    List<CourseVO> getCourseList(CourseDto courseDto);
    @Delete("delete from course where id=#{courseid}")
    void deleteById(Integer courseid);

    void insert(Course course);
    @Select("select * from course where id=#{courseid}")
    Course selectById(Integer courseid);

    void updateCourse(Course course);
    @Select("select * from course")
    List<Course> selectList();

    @Select("select * from course where subject=#{subject}")
    List<Course> selectBySubject(Integer  subject);
}
